﻿namespace RrslLite.Dsl
{
    /// <summary>
    /// Sample how to use it:
    /// <![CDATA[
    ///public class Test
    ///{
    ///    private IBatchBuilder _builder = new AopWcfBuilder(svc);
    ///    public Test()
    ///    {
    ///        _builder
    ///            .Call<IFormatProvider>()
    ///                .WithQuery(p => p.GetFormat(typeof(string)), o => o.ToString())
    ///                .WithQuery(p => p.GetFormat(typeof(int)), o => o.ToString())
    ///            .Call<IConvertible>()
    ///                .WithQuery(c => c.ToBoolean(null), o => Console.WriteLine(o))
    ///            .Execute();
    ///    }
    /// }
    /// ]]>
    /// </summary>
    public interface IBatchBuilder
    {
        IBatchCallBuilder<TTarget> Call<TTarget>() where TTarget : class;

        Batch CurrentBatch { get; }
        void Execute();
    }
}